package model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the message database table.
 * 
 */
@Entity
public class Message implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="message_id")
	private int messageId;

	@Column(name="message_contenu")
	private String messageContenu;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="message_date")
	private Date messageDate;

	//bi-directional many-to-one association to Conversation
	@ManyToOne
	@JoinColumn(name="conversation_id")
	private Conversation conversation;

	public Message() {
	}

	public int getMessageId() {
		return this.messageId;
	}

	public void setMessageId(int messageId) {
		this.messageId = messageId;
	}

	public String getMessageContenu() {
		return this.messageContenu;
	}

	public void setMessageContenu(String messageContenu) {
		this.messageContenu = messageContenu;
	}

	public Date getMessageDate() {
		return this.messageDate;
	}

	public void setMessageDate(Date messageDate) {
		this.messageDate = messageDate;
	}

	public Conversation getConversation() {
		return this.conversation;
	}

	public void setConversation(Conversation conversation) {
		this.conversation = conversation;
	}

}